<template>
  <z-table :tableProps="tableProps">
    <template #title>
      <div>被评估词: {{ word }}</div>
      <div>评估场景: {{ evalaution_config_name }}</div>
    </template>
  </z-table>
</template>

<script lang="tsx" setup>
import ZTable from "@components/Table/ZTable.vue";
import { reactive } from "vue";

const props = withDefaults(
  defineProps<{
    word: string;
    evalaution_config_name: string;
    detail: any[];
  }>(),
  {
    word: "",
    evalaution_config_name: "",
    detail: () => [],
  }
);

const tableProps: any = reactive({
  bordered: true,
  striped: true,
  columns: [
    {
      title: "评估案例",
      key: "text",
    },
    {
      title: "命中数",
      key: "hit_count",
    },
    {
      title: "进审误中率",
      key: "rate",
    },
  ],
  pagination: false,
  maxHeight: 500,
  data: props.detail,
});
</script>
